package candidate_43148;
import java.util.*;
public abstract class Candidate_43148 implements Rank{
	protected String id,fullName;
	protected int DOB;
	
	public abstract double average();
	
	public void input(){
		Scanner kb=new	Scanner(System.in);
		System.out.print("Enter the ID:");
		id=kb.nextLine();
		System.out.print("Enter full name:");
		fullName=kb.nextLine();
		System.out.print("Enter day of birth:");
		DOB=kb.nextInt();
	}
	
	public String toString(){
		return "ID :"+id+"\n"+"Full Name :"+fullName+"\n"+"Day of birth :"+DOB+"\n";
		
	}
	
	public String rank() {
		if (average() >= 8 && average() <= 10)
			return "Good";
		else if (average() >= 7 && average() < 8)
			return "Fairly Good";
		else if (average() >= 5 && average() < 7)
			return "Average";
		else
			return "Fail";
	}
}
